@keyframes glow {
  0% { background-color: lighten($color-red-alert, 20%); }
  50% { background-color: lighten($color-red-alert, 10%); }
  100% { background-color: lighten($color-red-alert, 20%); }
}

button,
.button {
  -webkit-appearance: none;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-weight: bold;
  font-family: $font-jost;
  line-height: 125%;
  text-decoration: none;
  color: rgb(240, 240, 247);
  background-color: rgb(13, 13, 16);
  border-width: 1px;
  border-style: solid;
  border-top-color: rgb(115, 115, 129);
  border-right-color: rgb(60, 60, 74);
  border-bottom-color: rgb(50, 50, 58);
  border-left-color: rgb(110, 110, 123);
  border-radius: 3px;
  vertical-align: middle;
  box-shadow:
    rgba(0, 0, 0, 0.25) 0 0 15px,
    black 0 2px 1px 0,
    inset 0 1px 2px rgba(0, 0, 0, 0.5);
  transition: all 250ms;
  text-shadow: rgba(0, 0, 0, 0.75) 0 1px 0;
  background-image: $gradient-button-shine;
  background-repeat: no-repeat;
  background-position: center center;

  > hr {
    margin: 0.5rem 0;
  }

  &:hover {
    background-color: rgb(27, 27, 32);
    transform: translateY(-2px);
    box-shadow:
    rgba(0, 0, 0, 0.25) 0 0 25px,
    black 0 4px 1px 0,
      inset 0 1px 2px rgba(0, 0, 0, 0.5);
    background-size: 125%;

    @media (prefers-reduced-motion) {
      transform: none;
    }
  }

  &:disabled,
  &.button--disabled {
    filter: saturate(20%) brightness(75%) contrast(90%);
    pointer-events: none;

    &:hover {
      transform: none;
    }
  }

  &:active {
    transform: translateY(0);
    box-shadow:
      rgba(0, 0, 0, 0.25) 0 0 10px,
      black 0 1px 1px 0,
      inset 0 1px 2px rgba(0, 0, 0, 0.5);
    transition:
      transform 0ms,
      box-shadow 0ms;
  }
}

.icon-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;

  .icon {
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.75rem;
  }
}

.icon-button__label {
  min-width: 4.5rem;
  text-align: center;
}

.button--large {
  font-size: 1.25rem;
  padding: 1rem 1.25rem;
}

.button--primary {
  color: white;
  background-color: rgb(185, 0, 0);

  &:hover {
    background-color: rgb(225, 5, 5);
  }
}

.button--light {
  color: black;
  background-color: rgb(240, 240, 247);
  text-shadow: none;

  &:hover {
    background-color: white;
  }
}

.button--construction {
  color: black;
  text-shadow: none;
  background-color: $color-construction;
  background-image: $gradient-construction, $gradient-construction;
  background-position: top left, bottom left;
  background-size: 100% 5px;
  background-repeat: no-repeat;

  .badge {
    color: black;
  }

  &:hover {
    background-color: lighten($color-construction, 7.5%);
    background-size: 100% 5px;
  }
}

.button--reddit {
  color: white;
  background-color: darken($color-reddit, 7.5%);

  &:hover {
    background-color: $color-reddit;
  }
}

.button--twitter {
  color: white;
  background-color: darken($color-twitter, 7.5%);

  &:hover {
    background-color: $color-twitter;
  }
}

.button--facebook {
  color: white;
  background-color: darken($color-facebook, 7.5%);

  &:hover {
    background-color: $color-facebook;
  }
}

.button--youtube {
  color: white;
  background-color: darken($color-youtube, 7.5%);

  &:hover {
    background-color: $color-youtube;
  }
}

.button--discord {
  color: white;
  background-color: darken($color-discord, 7.5%);

  &:hover {
    background-color: $color-discord;
  }
}

.button--itch {
  background-color: darken($color-itch, 12.5%);

  &:hover {
    background-color: $color-itch;
  }
}

.button--moddb {
  background-color: darken($color-moddb, 7.5%);

  &:hover {
    background-color: $color-moddb;
  }
}

.button--gamereplays {
  background-color: darken($color-gamereplays, 7.5%);

  &:hover {
    background-color: $color-gamereplays;
  }
}

.button--openra-resource {
  background-color: darken($color-openra-resource, 7.5%);

  &:hover {
    background-color: $color-openra-resource;
  }
}

.button__icon {
  margin-left: 0.75rem;
}

.button-group {
  margin-top: 1rem;

  button,
  .button {
    display: inline-block;
    margin: 0 0.25rem 0.5rem 0;
  }

  .radio-button,
  .icon-button {
    display: inline-flex;
  }
}

.radio-button--icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;

  .button__icon {
    margin: 0 0 0.5rem 0;
    width: 2rem;
    height: 2rem;
  }
}

input.radio-button__input {
  margin-top: 0.75rem;
  margin-right: 0;
  margin-bottom: -1rem;
  width: 85%;
  height: 8px;
  border-radius: 5px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  border-bottom: none;
}